import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class PrintPosNumber {
	public static void main(String[] args) {
		Socket socket = null;
		try {
			
			socket = new Socket("10.66.252.219",9100);
			OutputStream os = socket.getOutputStream();
			for(int i = 1;i<=88;i++) {
				int count = i*2-1;
				String countStr = String.format("%03d", count);
				System.out.println(countStr);
				String msg = "^XA" + 
						"^MMT" + 
						"^PW440" + 
						"^LL0735" + 
						"^FT134,151^A0R,238,249^FD"
						+ countStr
						+ "^FS" + 
						"^PQ1,0,1,Y^XZ";
				os.write(msg.getBytes("utf-8"));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}finally {
			try {
				if(socket != null) {
					socket.close();
				}
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
}
